<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@page import="com.google.appengine.api.users.UserService" %>
<%@page import="com.google.appengine.api.users.UserServiceFactory" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<title>Recipe Master - Food Costing Application</title>
	</head>
<body>
	
	Hi welcome to Recipe Master a handy and simple "Food Costing" application that will help you organize and manage you cooking costs.

	<br>

	<%
    UserService userService = UserServiceFactory.getUserService();

	if ( ! userService.isUserLoggedIn()) {
   	%>
      Please <A HREF="<%= userService.createLoginURL("/modules/recipe.html") %>">Log in</A> in orde to have access to the application.
   	<% 
	} 
	else { 
		//redirect to the main screen
		response.sendRedirect("/modules/recipe.html");
		
	}
   %>

</body>
</html>